unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, Grids, AdvObj, BaseGrid, AdvGrid;

type
  TForm1 = class(TForm)
    Grid_1: TAdvStringGrid;
    procedure FormShow(Sender: TObject);
    procedure Grid_1GetFormat(Sender: TObject; ACol: Integer;
      var AStyle: TSortStyle; var aPrefix, aSuffix: String);
  private
  public
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.FormShow(Sender: TObject);
var
  I:Integer;
begin
  with Grid_1 do
  begin
    SortSettings.Show:=True;
    
    for I:=1 to RowCount-1 do
    begin
      Cells[1,I]:=IntToStr(I);
      Cells[2,I]:=FloatToStrF(10000*I,ffNumber,18,2);
    end;

    AddRow;
    Cells[1,RowCount-1]:=IntToStr(RowCount-1);
    Cells[2,RowCount-1]:=FloatToStrF(53654,ffNumber,18,2);
  end;
end;

procedure TForm1.Grid_1GetFormat(Sender: TObject; ACol: Integer;
  var AStyle: TSortStyle; var aPrefix, aSuffix: String);
begin
  if ACol=2 then
  begin
    AStyle:=ssFinancial;
  end;
end;

end.
